In a magnetic sensor, as shown in FIG. 1B, two magnetoresistive devices R1 and R2 are connected in series on a substrate 10. Each of the magnetoresistive devices R1 and R2 is constructed with one or a series of two or more magnetic tunnel junction devices (TMR devices) and one of the magnetoresistive devices (for example, R2) is magnetically shielded.
In this magnetic sensor, the temperature characteristics of the magnetoresistive devices R1 and R2 are virtually identical. Therefore,when a given voltage is applied between electric terminals Pa and Pb at one end and the other of the serial path of the magnetoresistive devices R1 and R2 and no external magnetic field is applied into the plane of the substrate 10, a constant output voltage is produced between the electric terminals Pc and Pb (or Pa and Pc) at both ends of the magnetoresistive device R2 (or R1) regardless of the temperature. The constant output voltage is, for example, Vin/2, where Vin represents the voltage between the terminals Pa and Pb.
When an external magnetic field is applied to the plane of the substrate 10, the electric resistance of the magnetoresistive device R1 varies depending on the orientation and magnitude of the magnetic field. Thus the output voltage between the terminals Pc and Pb (or Pa and Pc) varies as the electric resistance changes. In the TMR devices which constitute the magnetoresistive devices R1 and R2, the change in resistance is very small even when the ambient temperature varies with an external magnetic field. Consequently, this magnetic sensor shows a favorable temperature characteristic.
However, in the manufacturing process, when fixing the chip to a lead frame, the chip is likely to crack at the portion covered by a magnetic shield layer 42 due to changes of temperature from a heat treatment temperature level to a room temperature level.